/**
 * @Author: yy
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-10-13 15:18:32
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
// 查询城市列表
export const queryClueSearchList = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/queryClueListByCustomerOrPhone`, { params });
// 网销经理/顾问查询线索列表
export const clueMarkftinhView = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/clueMarkftinhView`, { params });
//potenCus/combineClue 合并线索
export const combineClue = params => axios.post(`${SERVER.CYXDMS_CLUE}/potenCus/combineClue`, params);
// 新增保存
export const addNewClue = params => axios.post(`${SERVER.CYXDMS_CLUE}/clue/mobileAddClueRecord`, params);


// 下载模板
export const downloadExcel = params => {
  return axios({
    url: `${SERVER.CYXDMS_CLUE}/clue/clueRecordExcelDownload`,
    method: 'get',
    params: params,
    responseType: 'blob'
  });
};
// 导入
export const importClues = params => axios.post(`${SERVER.CYXDMS_CLUE}/clue/clueRecodeExcelDataImport`, params);

// 导出
export const exportClues = params => {
  return axios({
    url: `${SERVER.CYXDMS_CLUE}/clue/exportRecordList`,
    method: 'get',
    params: params,
    responseType: 'blob'
  });
};

export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);


//  查询线索信息
// export const queryPotenCusManage = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/clueMarkftinhView`, { params });
